package com.wy.dao;

import com.wy.pojo.Tousu;
import com.wy.pojo.Weixiu;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface WeixiuDao extends JpaRepository<Weixiu,Integer> {

/*    @Override
    Page<Dog> findAll(Pageable pageable);*/


    /**
     *  模糊查询或者等值查询
     * @param example
     * @param pageable
     * @return
     */
    @Override
    Page findAll(Example example, Pageable pageable);

    @Query("update Weixiu set yanshou=?2,spyj=?3 where id=?1")
    @Modifying
    public void updateRecord(Integer id,String yanshou,String spyj);
}
